<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<script type="text/javascript" src="../view/admin/js/jquery.js"></script>
<title>用户登录</title>
<style type="text/css">
html,body,div,span,dl,dd,dt,p,li,ol,ul,img{
	margin:0;
	padding:0;
	border:0;}
dl,dt,dd{
	display:block;}
ul,ol,li{
	list-style:none;}

body{
	background-color:#F5F9FC;}
#box{
	position:absolute;
	margin:0 auto;
	height:454px;
	width:100%;
	background:url(../view/admin/images/bgColor.jpg) repeat-x;}

#box .main{
	width:609px;
	height:454px;
	margin:0 auto;
	position:relative;}
#box .main .bg{
	position:absolute;
	z-index:1;}
#box .main .cont{
	position:absolute;
	z-index:10;
	left:455px;
	top:278px;
	width:181px;
	height:173px;
	overflow:hidden;}
#box .main .cont dl{
	margin-bottom:3px;
	overflow:hidden;}
#box .main .cont dt{
	white-space:nowrap;
	line-height:20px;
	float:left;
	width:42px;
	color:#fff;
	font-size:12px;}

#box .main .cont dd{
	line-height:20px;
	float:left;
	width:100px;
	overflow:hidden;}	
#box .main .cont .username{
	width:100px;}
#box .main .cont .password{
	width:100px;}
#box .main .cont .verify{
	position: absolute;
	top: 0;
	width:50px;}
#box .main .cont .button{}
#login{
	height:22px;
	width:64px;
	position:absolute;
	top:83px;
	left:0;
	cursor:pointer;}
#reset{
	height:22px;
	width:64px;
	position:absolute;
	left:81px;
	top:83px;
	cursor:pointer;}
input.error{
	background-color: #FFADFF;
	border: 1px solid #f00;
}	
</style>
<script type="text/javascript">
$(document).ready(function(e) {
/*==============================================================================*/   
/**垂直居中**/
//------------------------------------------------------------------------------
var fnAutoCenter=function(id){
	$(id).css('top',$(document).height() / 2 - $(id).height() / 2 - 30 + 'px');
}
fnAutoCenter('#box');
$(window).resize(function(){
	fnAutoCenter('#box');
});
/*=============================================================================*/	
/**提交和重置按钮**/
/*-----------------------------------------------------------------------------*/
$('#login').click(function(event) {
	if($('#tno').val()==""){
		alert("请输入用户名");
		return false;
	}else if($('#pwd').val()==""){
		alert('请输入密码');
		return false;
    }else{
    	$.ajax({
    		url:'./index.php?c=login&a=loginAction',
    		dataType:'json',
    		data:{tno:$('#tno').val(),pwd:$('#pwd').val()},
    		type:'post',
    		success:function(data){
    			if(data==1){
    				alert('用户名和密码不匹配');
    				return false;
    			}else if(data==2){
    				window.location='./index.php';
    			}else{
    				alert('登录失败');
    				return false;
    			}
    		}
    	});
    }
});

$('#reset').click(function(event) {
	$('form:first input').val('');
});

$(document).keydown(function(event) {
	if( event.keyCode == 13 ){
		$('#login').click();
	}
});

	
});
</script>
</head>

<body>
<div style="width:100%;height:40px;background-color:#F5F9FC"></div>	
<div id="box">
    <div class="main">
        <div class="bg">
            <table id="__01" width="694" height="454" border="0" cellpadding="0" cellspacing="0">
	<tr>
		<td>
			<img src="../view/admin/images/bg2_01.gif" width="694" height="62" alt=""></td>
	</tr>
	<tr>
		<td>
			<img src="../view/admin/images/bg2_02.gif" width="694" height="126" alt=""></td>
	</tr>
	<tr>
		<td>
			<img src="../view/admin/images/bg2_03.gif" width="694" height="44" alt="谷歌浏览"></td>
	</tr>
	<tr>
		<td>
			<img src="../view/admin/images/bg2_04.gif" width="694" height="44" alt=""></td>
	</tr>
	<tr>
		<td>
			<img src="../view/admin/images/bg2_05.gif" width="694" height="39" alt=""></td>
	</tr>
	<tr>
		<td>
			<img src="../view/admin/images/bg2_06.gif" width="694" height="37" alt=""></td>
	</tr>
	<tr>
		<td>
			<img src="../view/admin/images/bg2_07.gif" width="694" height="49" alt=""></td>
	</tr>
	<tr>
		<td>
			<img src="../view/admin/images/bg2_08.gif" width="694" height="53" alt=""></td>
	</tr>
</table>
        </div>
        <div class="cont">
        <form id="yw0" action="./index.php?c=login&a=loginAction" method="post">        	
            <dl>
            	<dt><label for="tno">用户名</label>：</dt>
                <dd>
                	<input class="username" name="tno" id="tno" type="text" />
                </dd>
            </dl>
        	<dl>
            	<dt><label for="pwd">密码</label>：</dt>
                <dd>
                	<input class="password" name="pwd" id="pwd" type="password" />
                </dd>
            </dl>
        	<!-- <dl>
            	<dt><label for="LoginForm_verify">验证码</label>：</dt>
                <dd style="width:100px; height:50px; position:relative;">
                	<input class="verify" autocomplete="off" name="LoginForm[verify]" id="LoginForm_verify" type="text" />                	<img style="position:absolute; right:0; cursor:pointer;" title="点击更换验证码" id="yw1" src="/php_pageyii/index.php?r=houtai/index/captcha&amp;v=54b5dcdd1ffa1" alt="" />                	
                </dd>
            </dl> -->
        	<div class="button">
        		<div id="login" title="登录"></div>
                <div id="reset" title="重置"></div>
            </div>
        </form>       
       </div>
    </div>
</div>
    
    
<script type="text/javascript">
/*<![CDATA[*/
/*jQuery(function($) {

jQuery(document).on('click', '#yw1', function(){
	jQuery.ajax({
		url: "\/php_pageyii\/index.php?r=houtai\/index\/captcha&refresh=1",
		dataType: 'json',
		cache: false,
		success: function(data) {
			jQuery('#yw1').attr('src', data['url']);
			jQuery('body').data('captcha.hash', [data['hash1'], data['hash2']]);
		}
	});
	return false;
});

});*/
/*]]>*/
</script>
</body>
</html>
